<?php echo $this->render('layouts/__header.phtml'); ?>
<?php echo $this->render('layouts/__nav.phtml'); ?>

<link rel="stylesheet" type="text/css" href="/css/ticket.css" />

		<form action="<?php echo $this->this_url; ?>" method="post">
		
			<h2>Add New Ticket</h2>
			<table class="table550">
				<tr><td>&nbsp;</td></tr>
				<tr>
					<td>
						<span class="left">Requester</span>
						<?php echo $this->formSelect('requester_id', 0, null, $this->entites['requester']) ?>
					</td>
				    <td>
						<span>Replier</span>
						<?php echo $this->formSelect('replier_id', 0, null, $this->entites['manager']) ?>
					</td>
				</tr>
				<tr>
				    <td>
						<span class="left">Property</span>
						<?php echo $this->formSelect('property_id', 0, null, $this->entites['property']) ?>
					</td>
				    <td>
						<span>Status</span>
						<?php echo $this->formSelect('status', 0, null, $this->entites['status']) ?>
					</td>
				</tr>
				<tr>
					<td colspan="2" style="color:#000;font-weight:bold">Ticket Type</td>
				</tr>
				<tr>
					<td colspan="2"><?php echo $this->formRadio('ticket_type', 'common', array('style' => 'width:68px'), $this->entites['ticket_type']) ?></td>
				</tr>
				<tr>
					<td colspan="2"><span class="left">Title</span></td>
				</tr>
				<tr>
					<td colspan="2"><input id="title" name="title" type="text" class="ticket_title" value="" /></td>
				</tr>
				<tr>
					<td colspan="2"><span class="left">Content</span></td>
				</tr>
				<tr>
					<td colspan="2"><textarea name="content"></textarea></td>
			    </tr>
				<tr>
					<td colspan="2"><span class="common left">Background</span></td>
				</tr>
				<tr>
					<td colspan="2"><textarea name="background"></textarea></td>
			    </tr>
			    <tr><td colspan="2" class="spacing"></td></tr>
				<tr>
					<td colspan="2"><input type="submit" name="save" value="Save" class="but" /><input id="cancelbtn" type="button" value="Cancel" class="but" /></td>
				</tr>
			</table>

		</form>

<script type="text/javascript" src="/js/mootools.js"></script>
<script type="text/javascript" src="/js/base.js"></script>
<script type="text/javascript">
window.addEvent('domready', function(){
	$('cancelbtn').addEvent('click', function(e){	
		e = new Event(e);
		redirect('<?php echo $this->page_url;?>');
		e.stop();
	});
});
</script>

<?php echo $this->render('layouts/__footer.phtml'); ?>